<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/index3.css"/>
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
	</head>
	<body>
		
		<img src="img/1.png"/ id="">
		<img src="img/ren2.png"/ id="img1">
		<img src="img/ren1.png"/ id="img2">
		<div id="img3">
			<img src="img/kuang2.png" alt="" / >
			<div id="box1">
			<p>每天上班这么忙,</p>
			<p>哪儿有时间弄吃的,</p>
			<p>还是路边摊管饱又</p>
			<p>方便快捷!</p>
			</div>
		</div>
		<div id="img4">
			<img src="img/kuang.png" alt="" / >
			<div id="box2">
				<p>年轻就是身体好,</p>
				<p>有这么多好吃的摆着,</p>
				<p>控制不住就想去吃!</p>
				<!--<p>方便快捷!</p>-->
			</div>
		</div>
		
		
		
		<!--<img src="img/yinyue.gif"/ id="yingyue">-->
		<img src="img/jiantou.gif" alt="" / id="img">
		<audio src="music/bgm.mp3" id="yy" autoplay="autoplay" loop="loop"></audio>
		<img src="img/close.png" id="close" alt="" />
		<img src="img/yinyue.gif" / id="yingyue">

		<script src="css/animateBak.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var img1=document.getElementById('img1')
			var img2=document.getElementById('img2')
			var img3=document.getElementById('img3')
			var img4=document.getElementById('img4')
			var s1
			var s2
			var s3
			var s4
			var num=3.76;
			var time =setTimeout(function(){
				animate(img2,{left:0})
			})
			var time =setTimeout(function(){
				animate(img3,{opacity:1})
			},2500)
			var time =setTimeout(function(){
				animate(img1,{right:0})
			},3500)
			var time =setTimeout(function(){
				animate(img4,{opacity:1})
			},5000)
			var time =setTimeout(function(){
				location.href = 'index4.html'
			},8000)
			document.ontouchstart=function(evt){
				var touch=evt.targetTouches[0];
				 s1=touch.pageX
				 s2=touch.pageY
//				console.log(s1)
				console.log(s2)
				document.ontouchmove=function(evs){
				var touch1=evs.targetTouches[0];
				 s3=touch1.pageX
				 s4=touch1.pageY
//				console.log(s3)
				console.log(s4)
				}
//				console.log(s3)
				document.ontouchend=function(){
//				var touch2=eva.targetTouches[0];
				document.ontouchmove=null;
				var s5=s4-s2
				var s6=s3-s1
				console.log(s5)
				if(s5>300){
					location.href = 'index2.html'
				}else if(s5<-300){
					location.href = 'index4.html'
				}
//				console.log(s6)
//				if(){
//					
//				}
				
				}
			}
			var audi = document.getElementById('yy')
			var close = document.getElementById('close')
			var yingyue = document.getElementById('yingyue')
			yingyue.onclick = function() {
				audi.pause()
				console.log(1)
				yingyue.style.display = 'none'
				close.style.display = 'inline-block'

			}
			close.onclick = function() {
				audi.play()
				//				console.log(1)
				yingyue.style.display = 'inline-block'
				close.style.display = 'none'
			}

			
			
			
		</script>
	</body>
</html>
